package com.joyintech.enums;

public enum AssetTypeEnum {

    LD("01","灵动类"),
    BZ("02","保障类"),
    JQ("03","进取类"),
    WJ("04","稳健类"),
    ;

    private String code;
    private String name;

    AssetTypeEnum(String code, String name) {
        this.code = code;
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public String getName() {
        return name;
    }

    public static AssetTypeEnum getNameByCode(String code) {
        for (AssetTypeEnum codeEnum : AssetTypeEnum.values()) {
            if (codeEnum.getCode().equals(code)) {
                return codeEnum;
            }
        }
        return null;
    }
}
